//
//  NSDictionary+ConcreteKV.h
//  TravelGuideMdd
//
//  Created by Song Xiaofeng on 13-6-6.
//  Copyright (c) 2013年 mafengwo.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>

@interface NSDictionary (ConcreteKV)

- (BOOL)hasValueForKey:(NSString *)key;

- (int)intValueForKey:(NSString *)key;

- (BOOL)boolValueForKey:(NSString *)key;

- (double)doubleValueForKey:(NSString *)key;

- (float)floatValueForKey:(NSString *)key;

- (long)longValueForKey:(NSString *)key;

- (long long)longLongValueForKey:(NSString *)key;

- (CGRect)rectValueForKey:(NSString *)key;

- (CGPoint)pointValueForKey:(NSString*)key;

- (CGSize)sizeValueForKey:(NSString*)key;

- (NSString*)stringValueForKey:(NSString*)key;

- (const char *)cStringForKey:(NSString *)key; //The returned C string is automatically freed just as a returned object would be released; you should copy the C string if it needs to store it outside of the autorelease context in which the C string is created.

- (SEL)selectorForKey:(NSString *)key;

/**
 *	url decoded string value
 *
 *	@param	key
 *
 *	@return	
 */
- (NSString*)urlValueForKey:(NSString*)key;
@end


@interface NSMutableDictionary (ConcreteKV)

- (void)setIntValue:(int)intValue forKey:(NSString *)key;

- (void)setBoolValue:(BOOL)boolValue forKey:(NSString *)key;

- (void)setDoubleValue:(double)doubleValue forKey:(NSString *)key;

- (void)setFloatValue:(float)floatValue forKey:(NSString *)key;

- (void)setLongValue:(long long)longValue forKey:(NSString *)key;

- (void)setLongLongValue:(long long)longLongValue forKey:(NSString *)key;

- (void)setRect:(CGRect)rect forKey:(NSString *)key;

- (void)setSize:(CGSize)si forKey:(NSString *)key;

- (void)setPoint:(CGPoint)point forKey:(NSString*)key;

- (void)setCString:(const char *)cString forKey:(NSString *)key;

- (void)setSelector:(SEL)selector forKey:(NSString *)key;


@end